﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:54:06
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.CMS
{
	/// <summary>
	/// 广告访问日志
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("广告访问日志")]
	[BindTable("AdVisitLog", Description = "广告访问日志", ConnName = "CMS", DbType = DatabaseType.SqlServer)]
	public partial class AdVisitLog
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _AdID;
		/// <summary>
		/// 广告编号
		/// </summary>
		[Description("广告编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "AdID", "广告编号", "", "int", 10, 0, false)]
		public Int32 AdID
		{
			get { return _AdID; }
			set { if (OnPropertyChange("AdID", value)) _AdID = value; }
		}

		private DateTime _ServerTime;
		/// <summary>
		/// 服务器时间
		/// </summary>
		[Description("服务器时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(3, "ServerTime", "服务器时间", "", "datetime2", 7, 0, false)]
		public DateTime ServerTime
		{
			get { return _ServerTime; }
			set { if (OnPropertyChange("ServerTime", value)) _ServerTime = value; }
		}

		private DateTime _ClientTime;
		/// <summary>
		/// 客户时间
		/// </summary>
		[Description("客户时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(4, "ClientTime", "客户时间", "", "datetime2", 7, 0, false)]
		public DateTime ClientTime
		{
			get { return _ClientTime; }
			set { if (OnPropertyChange("ClientTime", value)) _ClientTime = value; }
		}

		private String _IP;
		/// <summary>
		/// 地址
		/// </summary>
		[Description("地址")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(5, "IP", "地址", "", "nvarchar(50)", 0, 0, true)]
		public String IP
		{
			get { return _IP; }
			set { if (OnPropertyChange("IP", value)) _IP = value; }
		}

		private String _Address;
		/// <summary>
		/// 地址
		/// </summary>
		[Description("地址")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(6, "Address", "地址", "", "nvarchar(200)", 0, 0, true)]
		public String Address
		{
			get { return _Address; }
			set { if (OnPropertyChange("Address", value)) _Address = value; }
		}

		private String _OS;
		/// <summary>
		/// 
		/// </summary>
		[Description("")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(7, "OS", "", "", "nvarchar(50)", 0, 0, true)]
		public String OS
		{
			get { return _OS; }
			set { if (OnPropertyChange("OS", value)) _OS = value; }
		}

		private String _Browser;
		/// <summary>
		/// 浏览器
		/// </summary>
		[Description("浏览器")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(8, "Browser", "浏览器", "", "nvarchar(50)", 0, 0, true)]
		public String Browser
		{
			get { return _Browser; }
			set { if (OnPropertyChange("Browser", value)) _Browser = value; }
		}

		private String _Screen;
		/// <summary>
		/// 绿色
		/// </summary>
		[Description("绿色")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(9, "Screen", "绿色", "", "nvarchar(50)", 0, 0, true)]
		public String Screen
		{
			get { return _Screen; }
			set { if (OnPropertyChange("Screen", value)) _Screen = value; }
		}

		private String _Depth;
		/// <summary>
		/// 深度
		/// </summary>
		[Description("深度")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(10, "Depth", "深度", "", "nvarchar(50)", 0, 0, true)]
		public String Depth
		{
			get { return _Depth; }
			set { if (OnPropertyChange("Depth", value)) _Depth = value; }
		}

		private String _Referer;
		/// <summary>
		/// 引用
		/// </summary>
		[Description("引用")]
		[DataObjectField(false, false, true, 250)]
		[BindColumn(11, "Referer", "引用", "", "nvarchar(250)", 0, 0, true)]
		public String Referer
		{
			get { return _Referer; }
			set { if (OnPropertyChange("Referer", value)) _Referer = value; }
		}

		private String _CurrentPage;
		/// <summary>
		/// 当前页
		/// </summary>
		[Description("当前页")]
		[DataObjectField(false, false, true, 250)]
		[BindColumn(12, "CurrentPage", "当前页", "", "nvarchar(250)", 0, 0, true)]
		public String CurrentPage
		{
			get { return _CurrentPage; }
			set { if (OnPropertyChange("CurrentPage", value)) _CurrentPage = value; }
		}

		private String _Visitor;
		/// <summary>
		/// 访问或
		/// </summary>
		[Description("访问或")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(13, "Visitor", "访问或", "", "nvarchar(50)", 0, 0, true)]
		public String Visitor
		{
			get { return _Visitor; }
			set { if (OnPropertyChange("Visitor", value)) _Visitor = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(14, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(15, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(16, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(17, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "AdID" : return _AdID;
					case "ServerTime" : return _ServerTime;
					case "ClientTime" : return _ClientTime;
					case "IP" : return _IP;
					case "Address" : return _Address;
					case "OS" : return _OS;
					case "Browser" : return _Browser;
					case "Screen" : return _Screen;
					case "Depth" : return _Depth;
					case "Referer" : return _Referer;
					case "CurrentPage" : return _CurrentPage;
					case "Visitor" : return _Visitor;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "AdID" : _AdID = Convert.ToInt32(value); break;
					case "ServerTime" : _ServerTime = Convert.ToDateTime(value); break;
					case "ClientTime" : _ClientTime = Convert.ToDateTime(value); break;
					case "IP" : _IP = Convert.ToString(value); break;
					case "Address" : _Address = Convert.ToString(value); break;
					case "OS" : _OS = Convert.ToString(value); break;
					case "Browser" : _Browser = Convert.ToString(value); break;
					case "Screen" : _Screen = Convert.ToString(value); break;
					case "Depth" : _Depth = Convert.ToString(value); break;
					case "Referer" : _Referer = Convert.ToString(value); break;
					case "CurrentPage" : _CurrentPage = Convert.ToString(value); break;
					case "Visitor" : _Visitor = Convert.ToString(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得广告访问日志字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 广告编号
			///</summary>
			public const String AdID = "AdID";

			///<summary>
			/// 服务器时间
			///</summary>
			public const String ServerTime = "ServerTime";

			///<summary>
			/// 客户时间
			///</summary>
			public const String ClientTime = "ClientTime";

			///<summary>
			/// 地址
			///</summary>
			public const String IP = "IP";

			///<summary>
			/// 地址
			///</summary>
			public const String Address = "Address";

			///<summary>
			/// 
			///</summary>
			public const String OS = "OS";

			///<summary>
			/// 浏览器
			///</summary>
			public const String Browser = "Browser";

			///<summary>
			/// 绿色
			///</summary>
			public const String Screen = "Screen";

			///<summary>
			/// 深度
			///</summary>
			public const String Depth = "Depth";

			///<summary>
			/// 引用
			///</summary>
			public const String Referer = "Referer";

			///<summary>
			/// 当前页
			///</summary>
			public const String CurrentPage = "CurrentPage";

			///<summary>
			/// 访问或
			///</summary>
			public const String Visitor = "Visitor";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}